package com.zhxxfwzx.controller;

import com.zhxxfwzx.common.lang.RespBean;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @title: TestController
 * @Author LiJing
 * @Date: 2021/6/167:46 下午
 * @Version 1.0
 */
@RestController
public class TestController {

    @PreAuthorize("hasRole('cadre')")
    @GetMapping("/test2")
    public RespBean test(){
        return RespBean.ok("访问成功");
    }
}
